class Solution(object):
    def findContentChildren(self, g, s):
        """
        :type g: List[int]
        :type s: List[int]
        :rtype: int
        """
        g.sort()
        s.sort()
        left = 0
        right = 0
        n1 = len(g)
        n2 = len(s)
        count = 0
        while left < n1 and right < n2:
            if s[right] >= g[left]:
                count += 1
                left += 1
                right += 1
            else:
                right += 1
        return count